package generated1.ManyToMany.dao;
// default package
// Generated 9-apr-2009 16.21.53 by Hibernate Tools 3.2.2.GA

import generated1.ManyToMany.ApplabsuserOther;

import java.math.BigDecimal;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Home object for domain model class ApplabsuserOther.
 * @see .ApplabsuserOther
 * @author Hibernate Tools
 */
@Stateless
public class ApplabsuserOtherHome {

	private static final Log log = LogFactory
			.getLog(ApplabsuserOtherHome.class);

	@PersistenceContext
	private EntityManager entityManager;

	public void persist(ApplabsuserOther transientInstance) {
		log.debug("persisting ApplabsuserOther instance");
		try {
			entityManager.persist(transientInstance);
			log.debug("persist successful");
		} catch (RuntimeException re) {
			log.error("persist failed", re);
			throw re;
		}
	}

	public void remove(ApplabsuserOther persistentInstance) {
		log.debug("removing ApplabsuserOther instance");
		try {
			entityManager.remove(persistentInstance);
			log.debug("remove successful");
		} catch (RuntimeException re) {
			log.error("remove failed", re);
			throw re;
		}
	}

	public ApplabsuserOther merge(ApplabsuserOther detachedInstance) {
		log.debug("merging ApplabsuserOther instance");
		try {
			ApplabsuserOther result = entityManager.merge(detachedInstance);
			log.debug("merge successful");
			return result;
		} catch (RuntimeException re) {
			log.error("merge failed", re);
			throw re;
		}
	}

	public ApplabsuserOther findById(BigDecimal id) {
		log.debug("getting ApplabsuserOther instance with id: " + id);
		try {
			ApplabsuserOther instance = entityManager.find(
					ApplabsuserOther.class, id);
			log.debug("get successful");
			return instance;
		} catch (RuntimeException re) {
			log.error("get failed", re);
			throw re;
		}
	}
}
